Repository navigation
Conversation
… keys, cap AddTimeout - NamedStorageKeys ignores each query filter other than SoftDelete and Tenant, so a filter that an app adds (such as archived rows) no longer hides live rows from the sweep, which then deleted their objects. - ObjectStorage.DeleteAsync of a batch gives the keys that storage refused. SweepObjects logs them, sweeps the later pages, and fails the run at the end, so one refused key no longer stops every run at the same page. - AttachmentOptions refuses an AddTimeout over one hour at the start. CancelAfter threw on each add over about 49.7 days. Closes #538 Closes #534 Closes #537 Amp-Thread-ID: https://ampcode.com/threads/T-01a1fc7b-8e57-74d1-97bd-0a564a525017 Co-authored-by: Amp <amp@ampcode.com>
Owner
Author
|
review-gate: passed 3c310c8f0f5909f0efe38a9242611b05f4cf58c7 An independent review found no high or medium findings. It found two low ones, and both are fixed in 280577f:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The object sweep could silently delete live files, or stop sweeping the bucket at one bad key, and a bad
AddTimeoutbroke every upload with no startup error.Closes #538
Closes #534
Closes #537
What changed
NamedStorageKeysignores each named query filter of the model other thanSoftDeleteandTenant. A filter that an app adds, such as one that hides archived rows, no longer hides live rows from the sweep. The names come from the whole model, so a filter on the owner that a tenant navigation joins is ignored too.ObjectStorage.DeleteAsyncof a batch gives the keys that storage refused instead of throwing.SweepObjectslogs them as an Error, sweeps the later pages, and fails the run at the end, so BackWave runs it again.DeleteUnderAsyncstill throws as before.AttachmentOptions.Fromrefuses anAddTimeoutover one hour, and the message names the setting.docs/backend/attachments.mddescribes all three.Scope
Server sweep, object storage, attachment options, their tests, and the attachments doc. No API, migration, or frontend change.
Tradeoffs
Blast Radius
The sweep job and the batch delete, which has one caller. A deploy with
Attachments:AddTimeoutover one hour now fails at startup.Verification
dotnet test --solution FullstackTemplate.slnx: 4112 passed, 0 failed.Archivedfilter on workshop attachments keeps the object; a sweep with one-key pages and one refused key deletes the two later orphans and fails naming the key;AddTimeoutof 1:00:01 and 50 days stops the start, 1 hour starts.